const mongoose = require('mongoose');
const {Schema, model} = mongoose;
const claimsSchema = new Schema({
  applyTime: String,
  handleTime: {
    type: String,
    default: '处理中'
  },
  state: {
    type: Number,
    default: 1
  },
  images: Array,
  accidentTime: String,
  // ordersId: {
  //   type: Schema.Types.ObjectId,
  //   ref: 'ordersModel'
  // },
  // salesmenId: {
  //   type: Schema.Types.ObjectId,
  //   ref: 'salesmenModel'
  // },
  // custorsId: {
  //   type: Schema.Types.ObjectId,
  //   ref: 'customersModel'
  // },
  delete: {
    type: Boolean,
    default: false
  }
    
}, {versionKey: false});
const claimsModel = model('claimsModel', claimsSchema, 'claims');
module.exports.claimsModel = claimsModel;